<template>
  <!-- 返回首页 -->
  <a :href="Path">首页</a>
</template>

<script>
export default {
  name: 'ReturnFirstPage',
  data() {
    return {
      Path: '',
    };
  },
  mounted() {
    const path = this.$route.path;
    const index = path.lastIndexOf('/');
    const newPath = path.substring(0, index + 1);
    this.Path = newPath.concat('firstPage');
  },
};
</script>

<style></style>
